TableBatchMergeTableData
申请复制表数据
请求地址
POST
http://OmsAddress/app/newoms.php/webservice/business/table/batch-merge-table-data?cmd=10008&ip-type=webservicerest&access-token=AccessTokenVal
POST请求参数说明
| 字段名称 | 数据类型 | 是否必填字段 | 说明 | 备注 | 
|---|---|---|---|---|
| app_id | 整型 | 是 | 需要复制数据的源表、目标表(合服的表)所在的业务的id | |
| src_zone_id | 整型 | 是 | 需要复制数据的源表所在的游戏区的id | |
| dest_zone_id | 整型 | 是 | 需要复制数据的目标表所在的游戏区的id | |
| tables_info | json | 是 | 需要复制数据的表的信息 格式如下: { "table_name_1":{"ignore_check_index":1}, "table_name_2":{"ignore_check_index":0}, } 其中: 1、ignore_check_index表示是否忽略表的索引检查 | |
| attention_man | 字符串 | 否 | 用分号";"分隔关注人,关注人可执行此单据任务,字段最大长度为200 | 
Data参数
使用json格式表示记录相关信息,示例如下:
{
    "app_id": 3,
    "src_zone_id": 1,
    "dest_zone_id": 2,
    "tables_info": {
        "table_in_same_svr": {
            "ignore_check_index": 1
        },
        "table_in_zone123_1": {
            "ignore_check_index": 0
        }
    }
}
返回语法
返回参数说明
- 返回状态码不为200,json格式,key、value的集合 
- 返回状态码为200,各表对应的申请成功的复制表数据的申请单,查询申请单详情时需要用到 
| key | key的类型 | key对应的value的类型 | key对应的value的说明 | 
|---|---|---|---|
| key1 | 字符串 | 数组 | 与key1相关的错误信息 | 
| key2 | 字符串 | 数组 | 与key2相关的错误信息 | 
请求示例
通过 curl 方法发起请求
命令中的参数请参考本页中的“POST请求参数说明”,access-token的获取方法详见:获取access-token
curl -H "Content-type: application/json" -X "POST" -d '{
"app_id": 3,
"src_zone_id": 1,
"dest_zone_id": 2,
"tables_info": {
"table_in_same_svr": {
"ignore_check_index": 1
},
"table_in_zone123_1": {
"ignore_check_index": 0
}
}
}' http://omsaddressapp/newoms.php/webservice/business/table/batch-merge-table-data?cmd=10008&ip-type=webservicerest&access-token=<access-token>
返回示例
成功返回示例
http请求的Status=200
[
    {
        "id": 289,
        "set_id": 126,
        "app_id": 3,
        "zone_list": "1",
        "user": "tcaplus",
        "table_name": "table_in_same_svr"
    },
    {
        "id": 290,
        "set_id": 126,
        "app_id": 3,
        "zone_list": "1",
        "user": "tcaplus",
        "table_name": "table_in_zone123_1"
    }
]
错误返回
http请求的Status!=200
{
    "name": "Unauthorized",
    "message": "You are requesting with an invalid credential.",
    "code": 0,
    "status": 401,
    "type": "yii\\web UnauthorizedHttpException"
}
{
    "tables_info": [
        "有未完成的事务(MergeTableData) user:tcaplus error type:3 trans id:201 set id:126 Memo:MergeTableData"
    ]
}